/rand /set -q %wavfile $read c:\mirc\abc\random.txt | /set -q %fname c:\mirc\abc\ $+ %wavfile | /set -q %wavlen $lof(%fname) | /sound # %wavfile plays a random wav... < %wavfile of %wavlen bytes >
/srand /timer98 0 600 /run c:\command.com /c dir c:\mirc\abc\*.wav /b > c:\mirc\abc\random.txt | /timer99 0 $$?="Enter delay for random play:" /rand
/erand /timer98 off | /timer99 off
There is a directory specified 4 times (and the drive another 2 times) in the lines above. If your directory for wavs is different, change it in all 4 (or 6) places in these lines. Then save.
Paste the whole thing above - in one chunk into tools, alias - then click ok:
"/rand" is the alias that selects a random file, gets the length and plays it. - to play a random wav whenever you want.
"/srand" starts the random play. It will ask for a delay (in seconds) between files - turns on the auto-random playing.
"/erand" ends the random play.
What It Does:
"/rand" gets a random filename from the file "random.txt", finds the length of the file
and plays it (along with a little message). This is the workhorse.
The random player will update itself periodically, so don't let that little window popping up now & them surprise you. It's a good thing.
This plays only to the channel on which you activate it.
"/srand" updates your file list every 10 minutes. If you want to maintain the
file list yourself (don't want to give them all away? no probs :] ) just
change "/srand" to:
/srand /timer99 0 $$?="Enter delay for random play:" /rand
That's about it :)
Electric Monk
Chan-Op: #WAV/sound_help on DALnet
To activate, after pasting above line: copy this into where you type to chat & hit enter: then do the commands above to run/stop it. The directories in this line must match your directory for wavs also.
/run c:\command.com /c dir c:\mirc\abc\*.wav /b > c:\mirc\abc\random.txt